package cc.mrbird.system.log.model;

import cc.mrbird.common.poi.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author yux
 * @since 2019-07-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Loginfo", description = "日志信息类")
public class Loginfo implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "LogId", type = IdType.AUTO)
    @Excel(name = "主键")
    @ApiModelProperty("主键")
    private Integer logId;

    /**
     * 标题
     */
    @TableField("LogTitle")
    @Excel(name = "标题")
    @ApiModelProperty("标题")
    private String logTitle;

    /**
     * 评论
     */
    @TableField("LogContent")
    @Excel(name = "评论")
    @ApiModelProperty("评论")
    private String logContent;

    /**
     * 版本号
     */
    /*@TableField("version")
    @Getter(AccessLevel.NONE)
    //版本号，用于实现乐观锁,数据库中也增加相应的version字段
    @Version
    @Excel(name = "版本号")
    @ApiModelProperty("版本号")
    private Integer version;

    public Integer getVersion() {
        return this.version = version == null ? 1 : version;
    }*/
}
